<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<style type="text/css">
ul.rightTools {
	float: right;
	display: block;
}

ul.rightTools li {
	float: left;
	display: block;
	margin-left: 5px
}
</style>
<form id="pagerForm" method="get" model="viewRequest" action="#rel#">
	<input type="hidden" name="viewRequest.page" value="${page.number}" />
	<input type="hidden" name="viewRequest.size" value="${page.size}" />
	<c:forEach items="${viewRequest.params}" var="params">
		<input type="hidden" id="${params.key}"
			name="viewRequest.params['${params.key}']" value="${params.value}" />
	</c:forEach>
	<c:forEach items="${viewRequest.sort}" var="sort">
		<input type="hidden" name="viewRequest.sort.${sort.key}"
			value="${sort.value}" />
	</c:forEach>
</form>
<div class="pageContent">
	<div style="float: right; display: block; overflow: auto; width: 850px; border: solid 1px #CCC; line-height: 21px; background: #fff">
				<div class="pageHeader">
			<form rel="pagerForm"
				onsubmit="return navTabSearch22(this);"
				action="${rootUrl}/goods/attr-value!index" method="get">
				<div class="searchBar">
					<ul class="searchContent">
						<li><label>属性值：</label> <input type="text"
							name="search_content" id="search_content" value="${search_content}" />
							
							</li>
							<li>
							<input type="hidden" name="attrClassId" value="${attrClassId}" />
							</li>
					</ul>
					<div class="subBar">
						<ul>
							<li><div class="buttonActive">
									<div class="buttonContent">
										<button type="submit">检索</button>
									</div>
								</div></li>
						</ul>
					</div>
				</div>
			</form>
		</div>
		<div class="panelBar">
			<ul class="toolBar">
				<li><a class="add" href="${rootUrl}/goods/attr-value!editNew?attrClassId=${attrClassId}"
					target="dialog" width="1000" height="600" rel="attr-value_new"
					title="添加"><span>添加</span></a></li>
			</ul>
		</div>
		<table class="table" id="jbsxBox" layoutH="138">
			<thead>
				<tr>
				    <th width="50" align="center" >序号</th>
					<th width="200" type="hidden">商品属性名称</th>
					<th width="200">商品属性值名称</th>
					<th width="145">是否展示</th>
					<th width="145">排序</th>
					<th width="145">操作</th>
				</tr>
			</thead>
			<tbody> 
				<c:forEach items="${page.content}" var="attrValue" varStatus="status">
					<tr target="data_id" rel="${attrValue.id}">
					    <td>${status.count}</td>
					    <td>${attrValue.attrClass.name}</td>
						<td>${attrValue.name}</td>
						<td>${attrValue.isShow==1?"是":"否"}</td>
						<td>${attrValue.sort}</td>
						<td>
<a title="查看/编辑" target="dialog" width="1000" height="600" rel="attr-value_edit" title="修改" href="${rootUrl}/goods/attr-value/${attrValue.id}/edit" class="btnEdit">修改</a>						
<a title="确定要删除这个记录吗?" target="dialogAjaxTodo" href="${rootUrl}/goods/attr-value/${attrValue.id}?_method=delete" class="btnDel">删除</a>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	<div class="panelBar">
	<div class="pages">
		<span>显示</span> <select class="combox" name="numPerPage"
			onchange="dialogPageBreak({numPerPage:this.value})">
			<option value="${page.size}">${page.size}</option>
			<option value="20">20</option>
			<option value="50">50</option>
			<option value="100">100</option>
			<option value="200">200</option>
		</select> <span>条，共${page.totalElements}条 </span>
	</div>
	<div class="pagination" rel="jbsxBox" targetType="navTab"
		totalCount="${page.totalElements}" numPerPage="${page.size}"
		pageNumShown="10" currentPage="${page.number}"></div>
	</div>
   </div>
	</div>
<script>
function navTabSearch22(){
	var rel = "jbsxBox";
	var url = "${rootUrl}/goods/attr-value!index?attrClassId="+${attrClassId}+"&search_content="+$("#search_content").val();
	var $rel = $("#"+rel);
	$rel.loadUrl(url, {}, function(){
		$rel.find("[layoutH]").layoutH();
	});
	return false;
}
</script>
